const notifier = require('node-notifier');
const path = require('path');
const open = require('open');

function myNotifier(options, url) {
    notifier.notify({
        icon: path.resolve(__dirname, '../asset/bug.png'),
        wait: true,
        ...options,
    }, function (error, response, metadata) {
        if(url && metadata.action === 'clicked'){
            open(url, { app: 'chrome' })
        }
    })
}

module.exports = {
    myNotifier,
}
